import request from '@/util/request'
// 获取所有信息
export const getCommunityList = (pageCurrent:number, pageSize:number) => {
  return request({
    url: `/life/page/${pageCurrent}/${pageSize}`
  })
}

export const deleteCommunity = (id:number) => {
  return request({
    url: `/life/${id}`,
    method: 'delete'
  })
}

// 新增社区信息
export const saveCommunity = (activity:any) => {
  return request({
    url: '/life',
    data: activity,
    method: 'post'
  })
}

//  根据根据信息查询数据
export const querryCommunity = (id:string) => {
  return request({
    url: `/life/${id}`
  })
}

// 更新数据
export const updateCommunity = (community:any) => {
  return request({
    url: '/life',
    method: 'put',
    data: community
  })
}
